package com.recharge.controller;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.entity.Recharge;
import com.file.entity.FileCustomer;
import com.recharge.srevice.ValveService;
import com.utils.JsonResult;

/**
 * @Title: Valve.java
 * @Package com.recharge.controller
 * @author 孙梦楠
 * @date 2017年8月29日 上午9:51:13
 * @version V1.0.0
 */
@RestController
@RequestMapping(value = "/recharge")
public class ValveController {

	@Autowired
	private ValveService valveservice;

	
	//列出所有用户
	@RequestMapping(value = "/list_all_customer_total", method = RequestMethod.POST)
	public JsonResult<List<FileCustomer>> listallcustomer_total(
			@CookieValue(value = "opeorgcookie", required = false) String opeorgcookie,
			@CookieValue(value = "opetypecookie", required = false) String opetypecookie,
			@CookieValue(value = "languagecookie", required = false) String languagecookie){
		
		
		return valveservice.listallcustomer(opeorgcookie, opetypecookie, languagecookie,"总");
	}
	
	//列出所有用户
		@RequestMapping(value = "/list_all_customer_child", method = RequestMethod.POST)
		public JsonResult<List<FileCustomer>> listallcustomer_child(
				@CookieValue(value = "opeorgcookie", required = false) String opeorgcookie,
				@CookieValue(value = "opetypecookie", required = false) String opetypecookie,
				@CookieValue(value = "languagecookie", required = false) String languagecookie){
			
			
			return valveservice.listallcustomer(opeorgcookie, opetypecookie, languagecookie,"分");
		}

}
